<template>
  <div v-if="crud.props.searchToggle">
    <el-select v-model="query.personType" clearable size="small" placeholder="人员类型" class="filter-item" style="width: 200px" @change="crud.toQuery">
      <el-option v-for="item in dict.dict.type_org_person" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
    </el-select>
    <el-input v-model="query.personName" placeholder="姓名" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-input v-model="query.personAge" placeholder="年龄" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-input v-model="query.personPhone" placeholder="手机号" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-input v-model="query.personIdcard" placeholder="身份证" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-select v-model="query.personPolitical" clearable size="small" placeholder="政治面貌" class="filter-item" style="width: 200px" @change="crud.toQuery">
      <el-option v-for="item in dict.dict.type_common_political" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
    </el-select>
    <region-tree v-model="query.regionId" placeholder="请选择所在区域" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <org-tree v-model="query.orgId" placeholder="请选择所在组织" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-input v-model="query.userId" placeholder="用户ID" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />

    <!--通用查询-->
    <rrOperation :crud="crud" />
  </div>
</template>

<script>
import { header } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import RegionTree from '@/views/business/common/org/components/RegionTree/index'
import OrgTree from '@/views/business/common/org/components/OrgTree/index'

export default {
  components: { OrgTree, RegionTree, rrOperation },
  mixins: [header()],
  props: {
    dict: {
      type: Object,
      required: true
    },
    permission: {
      type: Object,
      required: true
    }
  }
}
</script>
